package com.jqkb.pages;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jqkb.R;
import com.jqkb.TheApplication;
import com.jqkb.service.bean.User;

public class UserInfoActivity extends AppCompatActivity {

    private TextView tv_jh;
    private TextView tv_name;
    private TextView tv_company;
    private TextView tv_phone;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.user_info_activity);

        tv_jh= (TextView) findViewById(R.id.tv_jh);
        tv_name= (TextView) findViewById(R.id.tv_name);
        tv_company= (TextView) findViewById(R.id.tv_company);
        tv_phone= (TextView) findViewById(R.id.tv_phone);


        User user = TheApplication.getCurrentUser();
        tv_jh.setText(user.getJingHao());
        tv_name.setText(user.getName());
        tv_company.setText(user.getUnit().getTreeNamePath());
        tv_phone.setText(user.getMobile());

    }

    public void changePass(View view) {
        startActivity(new Intent(this, ChangePassActivity.class));
    }
}
